<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="//code.jquery.com/jquery-2.2.4.js"></script>
    <script type="text/javascript" src="../build/conversational-form.js" crossorigin ></script>
    
    <script>
    jQuery( document ).ready(function() {
        var dispatcher = new jQuery("form").eventDispatcher();
        
        dispatcher.addEventListener(jQuery("form").cf.FlowEvents.FLOW_UPDATE, function(event){
            console.log('EVENT CALLBACK', event);
        }, false);

        var cf = jQuery("form").conversationalForm({
            eventDispatcher: dispatcher,
            showProgressBar: true,
            loadExternalStyleSheet: false,
        });

        console.log('READY');
        console.log('conversationalForm', jQuery("form").conversationalForm);
        console.log('eventDispatcher', jQuery("form").eventDispatcher);
        console.log('cf', jQuery("form").cf.FlowEvents);
    });
    </script>
    <title>Document</title>
</head>
<body>
    <form>
        <input name="name" cf-questions="What is your name?" />
        <input name="age" type="number" cf-questions="What is your age?" />
    </form>
</body>
</html>